package demo6;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Demo {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("demo6");
        DBConnection d1 = context.getBean(DBConnection.class);
        System.out.println("d1:"+d1);
        DBConnection d2 = context.getBean(DBConnection.class);
        System.out.println("d2:"+d2);
    }
}
